﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;

namespace EGym.BL.Exceptions
{
    public class BussinessLayerEntryException : Exception
    {
        #region Propriedades

        public string Name { get; private set; }
        public string Value { get; private set; }
        public BussinessLayerEntryExceptionTypes ExceptionType { get; private set; }
        public object ObjectEntry{get; private set;}
        public object ObjectFounded { get; private set; }
        #endregion

        #region Construtores
        public BussinessLayerEntryException(string message, string name, string value, BussinessLayerEntryExceptionTypes exceptionType, object objectEntry, object objectFounded)
            : base(message)
        {
            Name = name;
            Value = value;
            ExceptionType = exceptionType;
            ObjectEntry = objectEntry;
            ObjectFounded = objectFounded;
        }

        public BussinessLayerEntryException(string message, Exception innerException, string name, string value, BussinessLayerEntryExceptionTypes exceptionType, object objectEntry, object objectFounded)
            : base(message, innerException)
        {
            Name = name;
            Value = value;
            ExceptionType = exceptionType;
            ObjectEntry = objectEntry;
            ObjectFounded = objectFounded;
        }

        public BussinessLayerEntryException(SerializationInfo info, StreamingContext context, string name, string value, BussinessLayerEntryExceptionTypes exceptionType, object objectEntry, object objectFounded)
            : base(info, context)
        {
            Name = name;
            Value = value;
            ExceptionType = exceptionType;
            ObjectEntry = objectEntry;
            ObjectFounded = objectFounded;
        }

        public BussinessLayerEntryException(string name, string value, BussinessLayerEntryExceptionTypes exceptionType, object objectEntry, object objectFounded)
        {
            Name = name;
            Value = value;
            ExceptionType = exceptionType;
            ObjectEntry = objectEntry;
            ObjectFounded = objectFounded;
        }

        #endregion
    }
}